import { Injectable } from '@angular/core';
import { ServiceBasic } from 'src/kalend';
import { Http } from '@angular/http';

@Injectable({
  providedIn: 'root'
})
export class WinelistService extends ServiceBasic {
  constructor(http: Http) {
    super('/winelist', http);
  }
  query(doc: any) {
    return this.httppost(`/query`, doc);
  }
  save(doc: any) {
    return this.httppost(`/save`, doc);
  }
  delete(id: any) {
    return this.httpget(`/delete/${id}`);
  }
  queryById(id: any) {
    return this.httpget(`/queryById/${id}`);
  }
  lock(id: any) {
    return this.httpget(`/lock/${id}`);
  }
  open(id: any) {
    return this.httpget(`/open/${id}`);
  }
}
